#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Last Update:

'''类继承中关于私有函数的问题, P87
'''
class Base(object):
    def __secret(self):
        print 'base'

    def public(self):
        #self.__secret()
        self._Base__secret()

class Derived(Base):
    def __secret(self):
        print 'derived'

Derived().public()
#base

##########vs##########

class Base(object):
    def _secret(self):
        print 'base'

    def public(self):
        self._secret()

class Derived(Base):
    def _secret(self):
        print 'derived'

Derived().public()
#derived
